The cursor buffer is only non-null when a cursor is created from pixbuf,
so it is not necessary to keep track of whether to free this buffer on
finalize.
} pixbuf;
struct wl_cursor *wl_cursor;
- gboolean free_buffer;
};
struct _GdkWaylandCursorClass
}
cursor->wl_cursor = c;
- cursor->free_buffer = FALSE;
return TRUE;
}
GdkWaylandCursor *cursor = GDK_WAYLAND_CURSOR (object);
g_free (cursor->name);
- if (cursor->free_buffer)
+ if (cursor->pixbuf.buffer)
wl_buffer_destroy (cursor->pixbuf.buffer);
G_OBJECT_CLASS (_gdk_wayland_cursor_parent_class)->finalize (object);
cursor->pixbuf.height,
stride,
WL_SHM_FORMAT_ARGB8888);
- cursor->free_buffer = FALSE;
wl_shm_pool_destroy (pool);